﻿<Window x:Class="remes.BLoc.TestApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Baml Localizer utility" Width="700" SizeToContent="Height">
  
  <Window.Resources>
    <Style x:Key="SectionBorderStyle" TargetType="{x:Type Border}">
      <Setter Property="BorderBrush" Value="Blue"/>
      <Setter Property="BorderThickness" Value="1"/>
      <Setter Property="CornerRadius" Value="5"/>
      <Setter Property="Padding" Value="3,2"/>
      <Setter Property="Margin" Value="3"/>
    </Style>
    <Style x:Key="HeadingStyle" TargetType="{x:Type TextBlock}">
      <Setter Property="FontSize" Value="16"/>
      <Setter Property="FontWeight" Value="Bold"/>
      <Setter Property="Foreground" Value="Teal"/>
      <Setter Property="Margin" Value="3"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type Button}">
      <Setter Property="Margin" Value="3"/>
      <Setter Property="Padding" Value="2,1"/>
      <Setter Property="MinWidth" Value="75"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type TextBox}">
      <Setter Property="Margin" Value="3"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type TextBlock}">
      <Setter Property="Margin" Value="3"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type ComboBox}">
      <Setter Property="Margin" Value="3"/>
      <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
  </Window.Resources>
  
  <StackPanel Orientation="Vertical" Margin="3">
    <Border Style="{StaticResource SectionBorderStyle}">
      <StackPanel Orientation="Vertical">
        <TextBlock Text="1. Choose Project" Style="{StaticResource HeadingStyle}"/>
        <DockPanel DockPanel.Dock="Top">
          <TextBlock DockPanel.Dock="Left" Text="Project file"/>
          <Button DockPanel.Dock="Right" Content="Open project" x:Name="OpenProjectButton" Click="OpenProjectButton_Click"/>
          <TextBox x:Name="ProjectPathTextBox" IsReadOnly="True"/>
        </DockPanel>
        <StackPanel Orientation="Horizontal">
          <TextBlock Text="Build configuration:"/>
          <ComboBox x:Name="BuildConfigurationsComboBox" Width="150"/>
          <TextBlock Text="(Needed for step 4. and 6.)" />
        </StackPanel>
      </StackPanel>
    </Border>
    
    <Border Style="{StaticResource SectionBorderStyle}">            
      <StackPanel Orientation="Vertical">
        <TextBlock Text="2. Maintain project settings" Style="{StaticResource HeadingStyle}"/>
        <Button Content="Edit project settings" x:Name="EditProjectSettingsButton" Click="EditProjectSettingsButton_Click" HorizontalAlignment="Left"/>
        <TextBlock Text="This step is only necessary once, after the project was created in Visual Studio." TextWrapping="Wrap"/>
      </StackPanel>
    </Border>

    <Border Style="{StaticResource SectionBorderStyle}">
      <StackPanel Orientation="Vertical">
        <TextBlock Text="3. Check and Update UID's" Style="{StaticResource HeadingStyle}"/>
        <StackPanel Orientation="Horizontal">
          <Button Content="Check UID's" x:Name="CheckUIDsButton" Click="CheckUIDsButton_Click"/>
          <Button Content="Update UID's" x:Name="UpdateUIDsButton" Click="UpdateUIDsButton_Click"/>
        </StackPanel>
        <TextBlock Text="Dependent on if you want to set your UID's manually or not use 'Check UID's' or 'Upadte UID's' button." TextWrapping="Wrap"/>
        <TextBlock Text="This step is necessary each time you have changed your project in Visual Studio, befor you can parse the Assembly." TextWrapping="Wrap"/>
        <Border Margin="3" CornerRadius="3" BorderBrush="DarkGray" BorderThickness="1">
          <Border.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
              <GradientStop Offset="0" Color="White"/>
              <GradientStop Offset="0.5" Color="Yellow"/>
              <GradientStop Offset="1" Color="#9f9f00"/>
            </LinearGradientBrush>
          </Border.Background>
          <TextBlock Foreground="Blue" FontWeight="Bold" Text="After updating the UID's you need to build the project in Visual studio before you can continue!" TextWrapping="Wrap"/>
        </Border>
      </StackPanel>
    </Border>

    <Border Style="{StaticResource SectionBorderStyle}">
      <StackPanel Orientation="Vertical">
        <TextBlock Text="4. Parse Assembly for new/updated texts" Style="{StaticResource HeadingStyle}"/>
        <Button Content="Parse Assembly" x:Name="ParseAssemblyButton" HorizontalAlignment="Left" Click="ParseAssemblyButton_Click"/>
        <TextBlock Text="This step is necessary to extract the texts from the Assembly." TextWrapping="Wrap"/>
      </StackPanel>
    </Border>

    <Border Style="{StaticResource SectionBorderStyle}">
      <StackPanel Orientation="Vertical">
        <TextBlock Text="5. Translate all texts into all languages" Style="{StaticResource HeadingStyle}"/>
        <Button Content="Translate texts" x:Name="TranslateButton" Click="TranslateButton_Click" HorizontalAlignment="Left"/>
      </StackPanel>
    </Border>

    <Border Style="{StaticResource SectionBorderStyle}">
      <StackPanel Orientation="Vertical">
        <TextBlock Text="6. Generate satelite Assemblies for languages" Style="{StaticResource HeadingStyle}"/>
        <Button Content="Generate satelite Assemblies" x:Name="GenerateAssembliesButton" Click="GenerateAssembliesButton_Click" HorizontalAlignment="Left"/>
        <TextBlock Text="This step generates the satelite Assemblies for all supported languages." TextWrapping="Wrap"/>
        <TextBlock Text="This must be done every time you have modified a baml. Else the sattelite assemblies will contain an old version of it." TextWrapping="Wrap"/>
      </StackPanel>
    </Border>
  </StackPanel>
</Window>
